<template>
  <el-cascader
    :placeholder="placeholder"
    :options="options"
    :props="props"
    :show-all-levels="false"
    :clearable="true"
    filterable
    @change="change"
    v-model="dataModal"
  />
</template>
<script lang="ts" setup>
import { reactive, ref, } from 'vue'
const deProps = defineProps({
  multiple: {
    type: Boolean,
    default: true,
  },
  options: {
    type: Array<any>,
    required: true,
  },
  placeholder: {
    type: String,
    required: true,
  },
})
const emit = defineEmits(['update:modelValue'])

const props = {
  multiple: deProps.multiple,
}
const dataModal = ref([])
const change = (e: any) => {
  emit('update:modelValue', dataModal.value)
}

</script>
